//
//  WordArrayController.h
//  Groups
//
//  Created by Mathieu on 14/08/06.
//  Copyright 2006 __MyCompanyName__. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import "SmartGroup.h"
@class WordMO;
@class QuizController;
@class GroupsArrayController;
@class LanguageArrayController;

@interface WordArrayController : NSArrayController {
	IBOutlet GroupsArrayController *groupArrayController;
	IBOutlet LanguageArrayController *languageArray;
	IBOutlet NSTableView *tableView;
	

}

-(void)addObject:(id)object;
-(IBAction)addWordFromWordNotFoundView:(id)sender;

-(void)remove:(id)sender;
- (void)registerAsObserver;

	// table view drag and drop support
- (BOOL)tableView:(NSTableView *)tv writeRowsWithIndexes:(NSIndexSet *)rowIndexes toPasteboard:(NSPasteboard*)pboard;
- (NSDragOperation)tableView:(NSTableView*)tv validateDrop:(id <NSDraggingInfo>)info proposedRow:(int)row proposedDropOperation:(NSTableViewDropOperation)op;
- (BOOL)tableView:(NSTableView *)aTableView acceptDrop:(id <NSDraggingInfo>)info row:(int)row dropOperation:(NSTableViewDropOperation)operation;
	// utility methods
-(void)defineNewlyInsertedWord:(WordMO *)word;
- (IBAction)importWords:(id)sender;
- (IBAction)exportWords:(id)sender;
-(IBAction)removeEntirely:(id)sender;
- (IBAction)addWord:(id)sender;




-(void)moveObjectsInArrangedObjectsFromIndexes:(NSIndexSet *)indexSet toIndex:(unsigned)index;
- (NSIndexSet *)indexSetFromRows:(NSArray *)rows;
- (int)rowsAboveRow:(int)row inIndexSet:(NSIndexSet *)indexSet;


@end
